GBML manual / Constants

DISTORT_PINCH

An hourglass: the sprite is full width at the top and the bottom and pinched in at the waist.

Works differently on Game Boy - The Game Boy narrows a picture by moving its two sprite pieces toward each other on the lines the look names, so the middle of the line is covered instead of squeezed; 16 pixels wide at most, one bent picture at a time.

Works differently on Game Boy Color - The Game Boy Color narrows a picture by moving its two sprite pieces toward each other on the lines the look names, so the middle of the line is covered instead of squeezed; 16 pixels wide at most, one bent picture at a time.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

DISTORT_PINCH: constant

<!-- GENERATED by tools/gbabel_looks.py from its LOOKS registry. Never edit this page: change the registry and re-run it. -->

Description

Names the hourglass, for sprite_distort. The top and the bottom of the sprite are drawn at their real width and the middle row is the narrowest, like a waist. Only the width changes: the sprite is no shorter.

strength is how much narrower the narrowest row is than the sprite: 1 is about four fifths of its width, 2 about two thirds and 3 a little over half. No row is ever drawn wider than the sprite, so no row is cut off at the sides.

A real capture, four pictures of the same gold plank - straight, then drawn as an hourglass at strength 1, strength 2 and strength 3 (it is pinched in more and more at the waist, the ends stay full width)A real capture, four pictures of the same gold plank - straight, then drawn as an hourglass at strength 1, strength 2 and strength 3 (it is pinched in more and more at the waist, the ends stay full width)
A real capture, four pictures of the same gold plank - straight, then drawn as an hourglass at strength 1, strength 2 and strength 3 (it is pinched in more and more at the waist, the ends stay full width)

The same picture four times: straight, then strength 1, 2 and 3 from left to right, each one standing still where the pattern had got to. Real pictures from a Game Boy Advance ROM.

It is made for sprites up to about 32 pixels tall. A taller sprite gets the same shape, held at its strongest 16 rows above and below the middle.

Example

sprite_distort(DISTORT_PINCH, 2, 0);

A sprite pinched in at the waist. Call it once, for example in the object's Create event - it keeps going by itself until you call sprite_distort(DISTORT_NONE, 0, 0) or the object is destroyed.

See also: sprite_distortDISTORT_NONEDISTORT_BULGE